package components.managers
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.display.Sprite;
	import flash.geom.Point;

	public class DragVO
	{

		private var _bitmap:Bitmap;

		private var _bitmapData:BitmapData;
		
		private var _data:*;

		private var _sp:Sprite;

		private var _display:DisplayObject;

		private var _globalPoint:Point;

		public function DragVO(display:DisplayObject,data:*)
		{
			_display=display;
			
			_bitmapData=new BitmapData(display.width,display.height,true,0);
			_bitmapData.draw(display);
			
			_bitmap=new Bitmap(_bitmapData);
			
			_sp=new Sprite();
			_sp.addChild(_bitmap);
			_sp.alpha=0.5;
			
			_globalPoint=display.localToGlobal(new Point());
			_sp.x=_globalPoint.x;
			_sp.y=_globalPoint.y;
			
			_data=data;
		}
		
		public function get data():*
		{
			return _data;
		}
		
		public function get sp():Sprite
		{
			return _sp;
		}

		public function get display():DisplayObject
		{
			return _display;
		}

		public function get globalPoint():Point
		{
			return _globalPoint;
		}
	}
}